﻿using Slate;
using UniFramework.Battle;
using UniFramework.Skill;
using UnityEngine;

namespace UniFramework.Skill
{
	[System.ComponentModel.Category("Buff")]
	[System.ComponentModel.Description("创建Buff")]
	[Attachable(typeof(SkillTrack))]
	public class BuffClip : SkillBaseClip
	{
		public SkillBuffConfigNode data = new();

		public override object GetData()
		{
			data.triggerFrame = LogicFrameConfig.GetFrameCnt(startTime);
			data.endFrame = LogicFrameConfig.GetFrameCnt(endTime);
			return data;
		}

		public override void RefreshTime()
		{
			startTime = LogicFrameConfig.GetRealTime(data.triggerFrame);
			endTime = LogicFrameConfig.GetRealTime(data.endFrame);
		}
	}
}